A solver for a system of nonlinear system of equations in parallel. More...
#include <nonlinear_solver.hpp>
Public Types | |
typedef NonlinearSolverImplementation < T, I >::VectorType | VectorType |
typedef NonlinearSolverImplementation < T, I >::MatrixType | MatrixType |
typedef NonlinearSolverImplementation < T, I >::JacobianBuilder | JacobianBuilder |
typedef NonlinearSolverImplementation < T, I >::FunctionBuilder | FunctionBuilder |
Public Member Functions | |
NonlinearSolverT (const parallel::Communicator &comm, const int &local_size, JacobianBuilder form_jacobian, FunctionBuilder form_function) | |
Default constructor. | |
NonlinearSolverT (MatrixType &J, JacobianBuilder form_jacobian, FunctionBuilder form_function) | |
~NonlinearSolverT (void) | |
Destructor. |
A solver for a system of nonlinear system of equations in parallel.
This class is used to solve a system of nonlinear equations in the form
where is the Jacobian matrix,
is the solution Vector, and
is some Vector function of
.
Users of this class must specify functions or functors that build the Jacobian Matrix and the right hand side Vector. Typically, it's best to use functor classes or structs, since extra required information can be available to the Matrix/Vector construction.
Implementation ...
typedef NonlinearSolverImplementation<T, I>::FunctionBuilder gridpack::math::NonlinearSolverT< T, I >::FunctionBuilder |
Reimplemented in gridpack::math::NewtonRaphsonSolverT< T, I >.
typedef NonlinearSolverImplementation<T, I>::JacobianBuilder gridpack::math::NonlinearSolverT< T, I >::JacobianBuilder |
Reimplemented in gridpack::math::NewtonRaphsonSolverT< T, I >.
typedef NonlinearSolverImplementation<T, I>::MatrixType gridpack::math::NonlinearSolverT< T, I >::MatrixType |
Reimplemented from gridpack::math::NonlinearSolverInterface< T, I >.
Reimplemented in gridpack::math::NewtonRaphsonSolverT< T, I >.
typedef NonlinearSolverImplementation<T, I>::VectorType gridpack::math::NonlinearSolverT< T, I >::VectorType |
Reimplemented from gridpack::math::NonlinearSolverInterface< T, I >.
Reimplemented in gridpack::math::NewtonRaphsonSolverT< T, I >.
gridpack::math::NonlinearSolverT< T, I >::NonlinearSolverT | ( | const parallel::Communicator & | comm, | |
const int & | local_size, | |||
JacobianBuilder | form_jacobian, | |||
FunctionBuilder | form_function | |||
) |
Default constructor.
Collective.
A NonlinearSolverT must be constructed simultaneously on all processes involved in comm
.
comm | communicator on which the instance is to exist | |
local_size | number Jacobian rows and Vector entries to be owned by this process | |
form_jacobian | function to fill the Jacobian Matrix, ![]() | |
form_function | function to fill the RHS function Vector, ![]() |
gridpack::math::NonlinearSolverT< T, I >::NonlinearSolverT | ( | MatrixType & | J, | |
JacobianBuilder | form_jacobian, | |||
FunctionBuilder | form_function | |||
) |
gridpack::math::NonlinearSolverT< T, I >::~NonlinearSolverT | ( | void | ) |
Destructor.
This must be called simultaneously by all processes involved in the communicator used for construction.